/* 侧边栏专用样式 */
body {
  width: 100%;
  min-width: 320px;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
  line-height: 1.5;
  color: #1a1a1a;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  width: 100%;
  min-height: 100vh;
}

#root {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 应用容器 - 侧边栏版本 */
.app {
  width: 100%;
  min-height: 100vh;
  padding: 20px;
  background: rgba(255, 255, 255, 0.98);
  margin: 0;
  box-shadow: none;
  backdrop-filter: blur(20px);
  border: none;
  border-radius: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
}

/* 头部样式 - 侧边栏版本 */
.header {
  text-align: center;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 10;
  padding: 16px 0;
  margin: -20px -20px 20px -20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header h2 {
  margin: 0;
  color: #1a1a1a;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 步骤容器 - 侧边栏版本 */
.steps-container {
  flex: 1;
  overflow-y: visible;
  margin-bottom: 20px;
}

/* 步骤项 - 侧边栏版本 */
.step-item {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.step-item:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
}

/* 配置行 - 侧边栏版本 */
.config-row {
  margin-bottom: 16px;
}

.config-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  letter-spacing: -0.1px;
}

.config-row input,
.config-row textarea,
.config-row select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.9);
  color: #1a1a1a;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

/* 自定义样式文本框 - 侧边栏版本 */
.styles-textarea {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  min-height: 120px !important;
  background: rgba(248, 250, 252, 0.9) !important;
  resize: vertical;
}

.styles-textarea:focus {
  background: rgba(255, 255, 255, 0.95) !important;
}

/* 按钮样式 - 侧边栏版本 */
.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn.secondary {
  background: rgba(107, 114, 128, 0.1);
  color: #374151;
  border: 1px solid rgba(107, 114, 128, 0.2);
}

.btn.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.btn.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

/* 底部操作区域 */
.bottom-actions {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 16px 0;
  margin: 20px -20px -20px -20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.bottom-actions .btn {
  flex: 1;
  min-width: 140px;
}

/* 标签页样式 - 侧边栏版本 */
.tabs-container {
  margin-bottom: 20px;
}

.tabs-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  overflow-x: auto;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.tab {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  min-width: 0;
  flex-shrink: 0;
}

.tab.active {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  font-weight: 600;
}

.tab:hover:not(.active) {
  background: rgba(0, 0, 0, 0.05);
  color: #374151;
}

/* 响应式设计 */
@media (max-width: 400px) {
  .app {
    padding: 16px;
  }
  
  .header {
    margin: -16px -16px 16px -16px;
  }
  
  .bottom-actions {
    margin: 16px -16px -16px -16px;
  }
  
  .bottom-actions .btn {
    min-width: 120px;
  }
}

/* 加载动画 */
.loading {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}